<template>
	<div class="demand">
		<div class="content">
			<div class="tip">
				需求描述
				<span class="red">（*必填）</span>
			</div>
			<message v-model="form.value"></message>
			<div class="button" @click="submit">提交</div>
		</div>
		<div class="call">
			<call></call>
		</div>
	</div>
</template>

<script>
import { addDialog } from '../../api/dialog/dialog';
import store from '../../store';
export default {
	data() {
		return {
			form: {
				value: '',
				name: store.getters.name,
				phone: store.getters.phone,
				type: 1
			}
		};
	},
	methods: {
		async submit() {
			console.log(this.form);
			await addDialog(this.form);
			this.$modal.msgSuccess('提交成功');
		}
	}
};
</script>

<style lang="less" scoped>
.demand {
	.red {
		color: red;
	}
	padding: 60rpx 40rpx;
	.content {
		background-color: #fff;
		height: 600rpx;
		border-radius: 40rpx;
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		.tip {
			width: 100%;
			padding: 0 60rpx;
			font-weight: 700;
		}
		.button {
			margin-top: 60rpx;
			border: 1px solid black;
			height: 80rpx;
			width: 200rpx;
			line-height: 80rpx;
			text-align: center;
			font-size: 40rpx;
			background-color: #00070b;
			color: #fff;
		}
	}
	.call {
		margin-top: 60rpx;
		padding: 0 80rpx;
	}
}
</style>
